﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x0200002E RID: 46
	public class Int16Formatter : IMessagePackFormatter<short>
	{
		// Token: 0x060000A7 RID: 167 RVA: 0x00003E04 File Offset: 0x00002204
		private Int16Formatter()
		{
		}

		// Token: 0x060000A8 RID: 168 RVA: 0x00003E0C File Offset: 0x0000220C
		public int Serialize(ref byte[] bytes, int offset, short value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteInt16(ref bytes, offset, value);
		}

		// Token: 0x060000A9 RID: 169 RVA: 0x00003E16 File Offset: 0x00002216
		public short Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadInt16(bytes, offset, out readSize);
		}

		// Token: 0x04000022 RID: 34
		public static readonly Int16Formatter Instance = new Int16Formatter();
	}
}
